<?php
class ArtistController extends mcz_Controller
{
    public function __construct()
    {
		if(!$_SESSION['obj']->isAuth())
		{
			header('location: ' . mczURL('/auth'));
			die;
		}
		$this->setLayout('layout');
    }
	public function showAction($artist)
	{
		$artist = urldecode($artist);
		$this->assignToLayout('title', $artist);
		$tunes = mcz_Object::hydrate('mcz_Tune', mcz_DB::getInstance()
									 ->fetch('* from mcz_Tune where artist like ? order by album,track',
											 array($artist)));
		$this->display('artist', array(
									  'tunes' => $tunes,
									  'artist' => $artist
									  ));
	}
}